package com.yanqu.road.server.cmd.zhaoshang;

import com.yanqu.road.entity.enums.eSystemId;
import com.yanqu.road.pb.common.CommonProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.config.SystemOpenMgr;
import com.yanqu.road.server.manger.zhaoshang.ZsMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameErrorCode;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_ZS_WAR_REPORT_GET_REWARD, desc = "战报-奖励领取")
public class ZsWarReportUnReadCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        if(!SystemOpenMgr.systemOpen(player, eSystemId.ZhaoShang.getValue())){
            ret = GameErrorCode.E_SYSTEM_NO_OPEN;
            return;
        }

        if(!ZsMgr.isZsSystemOpenTime()){
            ret = GameErrorCode.E_SYSTEM_NO_OPEN;
            return;
        }
        //player.getModule(ZsModule.class).getReward();
        CommonProto.NullValueMsg.Builder reqMsg = CommonProto.NullValueMsg.newBuilder();
        player.sendPacket(CrossProtocol.C2_ZHAO_SHANG_GET_REWARD, reqMsg);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
